package com;

public class T3 {
    static public void main(String[] argv) {
        String str = "0123456789ABCDEF";
        char[] value = new char[str.length()];
        for (int i = 0; i < str.length(); i++) {
            value[i] = str.charAt(i);
        }

//        int a = 0;
//        a = 0;
//
//        String ss = str2HexStr("A");
//        int b = 0;
//        b = 0;

//        byte b1 = Byte.parseByte("AA", 16);
//
//        int c = 0;
//        c = 0;

//        byte[] aa = conbineByte("0AA0");


        String value1 = "-25";

        int ss = Integer.valueOf(value1);

        int c = 0;
        c = 0;

        int a = 200 -(-30);

        int d=0;
        d=0;
    }


    public static byte[] conbineByte(String str) {
        byte[] value = new byte[str.length()];
        for (int i = 0; i < str.length(); i++) {
            value[i] = Byte.parseByte(String.valueOf(str.charAt(i)), 16);
        }
        byte[] newValue = new byte[str.length() / 2];
        int j = 0;
        for (int i = 0; i < value.length; i += 2) {
            int one =  ((0xf & value[i]) << 4);
            int two =  (0xf & value[i + 1]);
            int conbineValue = one+two;
            newValue[j] = (byte) conbineValue;
            j++;
        }

        return newValue;
    }


}
